package com.songlanyun.modules.gains.controller.admin;

import java.util.Arrays;
import java.util.Map;

//import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.songlanyun.modules.gains.entity.ShopGainsBill;
import com.songlanyun.modules.gains.service.ShopGainsBillService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;



/**
 *  商家所得账单
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-12-03 11:03:16
 */
@RestController
@RequestMapping("admin/gainsbill")
public class ShopGainsBillAdminController extends AbstractController {
    @Autowired
    private ShopGainsBillService shopGainsBillService;

    /**
     * 商家所得账单分页
     * bill_type   账单类型（0，支出（提现），1收入（结算所得））
     * inner_mode 收入交易类型：1、销售商品，2、销售服务，3、运费所得
     * outer_mode  支出模式：（0，提现）
     * code  单号
     * page 第几页
     * limit 每页显示多少条
     *
     */
    @RequestMapping("/pages")
    //@RequiresPermissions("gains:shopgainsbill:list")
    public R list(@RequestParam Map<String, Object> params){
        params.put("shop_id",getShopId());
        PageUtils page = shopGainsBillService.queryPage(params);
        return R.ok().put("page", page);
    }



}
